import ply.lex as lex

reservadas ={
   
}

tokens = [
    'word'
]+list(reservadas.values())

def t_word(t):
    r'".*?(?<!\\)(\\\\)*?"'
    print t

def t_newline(t):
    r'\n+'
    t.lexer.lineno += len(t.value)

t_ignore  = ' \t'

def t_error(t):
    print "Illegal character '%s'" % t.value[0]
    t.lexer.skip(1)


lexer = lex.lex(debug=0)

def test(t):
    lexer.input(t)
    for i in lexer :print i

if __name__ == '__main__':
    s='''
    "fdf\'fdsf\'fdsf\'fds"
    "fdf\'fdsf\'fdsf\'fds"
    "fdf\'fdsf\'fdsf\'fds"
    "fdsf"
    "af\"gdf"
    '''
    test(s)

